<script>
	export default {
		globalData: {
			BASEURL: 'https://app.flkjwind.cn',
		},
		onLaunch: function() {
			console.log('App Launch')
			// #ifdef MP-WEIXIN
			uni.setStorageSync('statusBarHeight', (uni.getWindowInfo().statusBarHeight + 44) + 'px')
			// #endif
			// #ifndef MP-WEIXIN
			uni.setStorageSync('statusBarHeight', (uni.getSystemInfoSync().statusBarHeight + 44) + 'px')
			// #endif
			uni.getSystemInfo({
				success: function(res) {
					uni.setStorageSync('safeAreaInsets', res.safeAreaInsets)
				}
			});
		},
		onShow: function() {
			const updateManager = uni.getUpdateManager();
			updateManager.onUpdateReady(function(res) {
				uni.showModal({
					title: '更新提示',
					content: '新版本已经准备好，是否重启应用？',
					showCancel: true,
					success(res) {
						if (res.confirm) {
							uni.clearStorageSync();
							updateManager.applyUpdate();
						}
					}
				});
			});
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style lang="scss">
	/*每个页面公共css */
	.flex {
		display: flex;
		align-items: center;
	}

	.flex_jc_sb {
		display: flex;
		justify-content: space-between;
		align-items: center;
	}

	.flex_jc_cent {
		display: flex;
		justify-content: center;
		align-items: center;
	}




	.popupsTc {
		width: 600rpx;
		height: 380rpx;
		background: #FFFFFF;
		border-radius: 20rpx 20rpx 20rpx 20rpx;
		padding: 78rpx 30rpx 48rpx 30rpx;
		box-sizing: border-box;
		text-align: center;

		.title {
			font-family: PingFang SC, PingFang SC;
			font-weight: 500;
			font-size: 32rpx;
			color: #000000;
		}

		.cont {
			font-family: PingFang SC, PingFang SC;
			font-weight: 500;
			font-size: 28rpx;
			color: #B5B5BB;
			margin: 40rpx auto 60rpx;
		}

		.btn1 {
			width: 260rpx;
			height: 80rpx;
			background: #E4E4E4;
			border-radius: 40rpx 40rpx 40rpx 40rpx;
			font-family: PingFang SC, PingFang SC;
			font-weight: 500;
			font-size: 30rpx;
			color: #979797;
			line-height: 80rpx;
			text-align: center;
		}

		.btn2 {
			width: 260rpx;
			height: 80rpx;
			background: #0756FF;
			border-radius: 40rpx 40rpx 40rpx 40rpx;
			font-family: PingFang SC, PingFang SC;
			font-weight: 500;
			font-size: 30rpx;
			color: #FFFFFF;
			line-height: 80rpx;
			text-align: center;
		}
	}
</style>